package tesys.objects;
/**
 * @author Group5 Comp3350
 * This class defines a IterationTask object
 * describe ER between Iteration and task
 * It's a subclass of Task
 * 
 */
public class IterationTask
{
	
	private String iid;//iteration id
	private String tid;//task id
	
	//constructors
	
	public IterationTask(String iteration, String taskID)
	{		
		tid = taskID;
		iid = iteration;
	}
	//accessor
	public String getIID()
	{
		return (iid);
	}
	public String getTID()
	{
		return (tid);
	}	
	public boolean compareTo(Object obj)
	{
		boolean result;
		IterationTask it;
		
		result = false;
		
		if (obj instanceof IterationTask)
		{
			it = (IterationTask) obj;
			if ( it.getIID().equals(iid)  && it.getTID().equals(tid))
			{
				result = true;
			}
		}
		return result;
	}
	//toString()
	public String toString () 
	{
		return "Iteration ID " +getIID() + " Task ID "+getTID();
	}
}

